//
//  Const.swift
//  mmda
//
//  Created by 李陆涛 on 2018/4/16.
//  Copyright © 2018年 mmda. All rights reserved.
//

import UIKit
import RxSwift


//常用高度
let kScreenHeight = Int(UIScreen.main.bounds.size.height)
let kScreenWidth = Int(UIScreen.main.bounds.size.width)

let kStatusBarHeight = ISiPhoneX ? 44 : 20
let kNavigationBarHeight = ISiPhoneX ? 88 : 64
let kTableBarHeight = ISiPhoneX ? 83 : 49
let kBottomHeight = ISiPhoneX ?  34 : 0

let kPerPage = 10

let thumbImageWidth = 300



//判断机型
let ISiPhone4 = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 640, height: 960)) ?? false
let ISiPhone5 = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 640, height: 1136)) ?? false
let ISiPhone6 = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 750, height: 1334)) ?? false
let ISiPhone6p = UIScreen.main.currentMode?.size.equalTo(CGSize(width: 1242, height: 2208)) ?? false
var ISiPhoneX:Bool  {
    
    guard #available(iOS 11.0, *) else {
        
        return false
    }
    let inset = UIApplication.shared.windows[0].safeAreaInsets
    
    return inset.top > 20
}

let ISiPad = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad

//系统版本号
let kSystemVersion = Double(UIDevice.current.systemVersion)!

let kiOS9Later = kSystemVersion > 9.0

let kiOS10Later = kSystemVersion > 10.0
let kiOS11Later = kSystemVersion > 11.0

//App版本号
let kVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString")
let kVersionBuild = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion")

//颜色

let kTitleColor = UIColor(red: 9 / 255.0, green: 25 / 255.0, blue: 40 / 255.0, alpha: 1)
let kSubitleColor = UIColor(red: 52 / 255.0, green: 69 / 255.0, blue: 91 / 255.0, alpha: 1)
let kContentColor = UIColor(red: 142 / 255.0, green: 150 / 255.0, blue: 161 / 255.0, alpha: 1)
let subTitleColor = UIColor(red: 9 / 255.0, green: 25 / 255.0, blue: 40 / 255.0, alpha: 1)

let kThemeColor = UIColor(red: 9 / 255.0, green: 25 / 255.0, blue: 40 / 255.0, alpha: 1)
let kBGColor = UIColor.groupTableViewBackground
let kBlue = UIColor(red: 0 / 255.0, green: 184 / 255.0, blue: 228 / 255.0, alpha: 1)


//字体
let fontName = "PingFang SC"

let kFont10 = UIFont(name: fontName, size: 10)
let kFont12 = UIFont(name: fontName, size: 12)
let kFont14 = UIFont(name: fontName, size: 14)
let kFont17 = UIFont(name: fontName, size: 17)

let kNotifationNameObj = "kNotifationNameObj"

let kBackMapReloadNotifationName = NSNotification.Name(rawValue: "kBackMapReloadNotifationName")
let kLoginSuccessNotifationName = NSNotification.Name(rawValue: "kLoginSuccessNotifationName")
let kReloadUserNotifationName = NSNotification.Name(rawValue: "kReloadUserNotifationName")


